package servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/login")
public class login extends HttpServlet {
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException{
		int r=Integer.parseInt(request.getParameter("r"));
		int b=Integer.parseInt(request.getParameter("b"));
		int g=Integer.parseInt(request.getParameter("g"));	
		String R = Integer.toHexString(r); 
		String B = Integer.toHexString(g); 
		String G = Integer.toHexString(b);
		String color="#"+R+B+G;
		 PrintWriter out=response.getWriter();
		 out.println("<body style=background-color:"+color+"></body>");
		
		
	}
	
}
